import { ref, computed } from 'vue'
import { defineStore } from 'pinia'

// 配置数据
export const useConfigData = defineStore('configData', () => {
  const configData = ref({
    app_id: '',
    device_name: '',
    dpi: '',
    pcid: '',
    union_id: '',
    version: '',
  })
  const webPath = ref('');//web页面存放路径，正式环境需要

  function setConfigData(data: any) {
    configData.value = data;
  }

  function setWebPath(path: string) {
    webPath.value = path;
  }

  return {
    configData,
    webPath,
    setConfigData,
    setWebPath
  }
})
